import api from '../../lib/request';
export default({
	namespaced: true,
	state:()=>{
		return{
			goods:[]
		}
	},
	mutations:{
		update_goods(state,payload){
			console.log(payload);
			state.goods = payload
		},
	},
	 actions: {
		 update_good_async  (context) {
			 api.get('/medicine/findAll').then(res=>{
				console.log(res);
				context.commit('update_goods',res.data)
			})
		 }
	 }
})